package com.yjd.comm.tag.service;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.enums.ReferenceTypeEnum;
import com.yjd.comm.system.dto.OperParamDto;
import com.yjd.comm.tag.model.TagInfoDto;
import com.yjd.comm.tag.model.TagModel;

import java.util.List;
import java.util.Map;

/**
 * <b>description</b>：标签业务接口<br>
 * <b>time</b>：2017-06-27 08:58:17 <br>
 * <b>author</b>：  yangchangyan@yijiedai.com
 */
public interface ITagService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public TagModel insert(TagModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(TagModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param tag_id
	 * @return
	 * @throws Exception
	 */
	public int delete(long tag_id) throws Exception;

	/**
	 * 查询某个对象的标签名称
	 * @param param
	 * @return
	 * @throws Exception
	 */
	public List<TagInfoDto> getTagNameList(Map<String,Object> param)throws Exception;


	/**
	 * 新增一个标签
	 * @param model
	 * @param operParamDto
	 * @throws Exception
	 */
	public TagModel insert(TagModel model ,OperParamDto operParamDto)throws Exception;


	/**
	 * 修改一个标签信息
	 * @param model
	 * @param operParamDto
	 * @throws Exception
	 */
	public int update(TagModel model ,OperParamDto operParamDto)throws Exception;

	public List<TagModel> queryTags(Long ref_id, ReferenceTypeEnum ref_type) throws Exception;
}
